﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ThongTinHamDiet.ascx.cs"
    Inherits="Controls_Template_ThongTinHamDiet" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<style type="text/css">
    .redTitle
    {
        color: Red;
        font-weight: bold;
    }
    .stylePopup
    {
        background-color: #fff;
        z-index: 10001; /*width: 800px;
            height: 390px;*/
        width: 1000px;
        height: 350px;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
    }
    .modalBackground
    {
        height: 100%;
        left: 0;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: 10000;
        background-color: black;
        opacity: 0.3;
        filter: alpha(opacity=30);
    }
</style>
<script type="text/javascript" src="../../Scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.autosize.js"></script>
<script type="text/javascript">
    function ConfirmDeleteThongTinHamDiet() {
        var check = confirm('Bạn có chắc muốn xóa không ?');
        if (check == true) {
            document.getElementById('<%=hdnCheckConfirm.ClientID %>').value = "yes";
        } else {

        }
    }
</script>
<script type="text/javascript">
    function AutoExpand(tbNoiDung1) {
        tbNoiDung1.style.height = "1px";
        tbNoiDung1.style.height = (1 + tbNoiDung1.scrollHeight) + "px";
    }
</script>
<div id="content" style="margin-left: 20px">
    <h2 style="text-align: center; color: Blue">
        Thông Tin Hàm Diệt</h2>
    <div style="float: right; margin-right: 30px">
        <asp:Button Text="Xóa" ID="btnDeleteThongTinHamDiet" runat="server" class="button"
            Style="display: none" OnClientClick="ConfirmDeleteThongTinHamDiet()" OnClick="btnDeleteThongTinHamDiet_Click" />
        <asp:Button Text="Sửa" ID="btnEditThongTinHamDiet" runat="server" class="button"
            OnClick="btnEditThongTinHamDiet_Click" Style="display: none; right: 90px" />
        <asp:DropDownList ID="drpPermission" AutoPostBack="true" runat="server" Style="display: none"
            OnSelectedIndexChanged="drpPermission_SelectedIndexChanged">
            <asp:ListItem Value="2" Text="Chọn"></asp:ListItem>
            <asp:ListItem Value="0" Text="Public"></asp:ListItem>
            <asp:ListItem Value="1" Text="Private"></asp:ListItem>
        </asp:DropDownList>
        <br />
        <br />
    </div>
    <br />
    <asp:Label ID="lblNguoiPhanTich" runat="server" Style="color: Orange"></asp:Label><br />
    <br />
    <asp:Label ID="lblNgay" runat="server" Style="color: Orange"></asp:Label><br />
    <br />
    <asp:Label ID="lblTenHamDiet" runat="server" Style="color: Orange"></asp:Label><br />
    <br />
    <asp:Label ID="lblThongTinFileTuongUng" runat="server" Style="color: Orange"></asp:Label><br />
    <br />
    <asp:Label ID="lblNhanDien" runat="server" class="redTitle">I. Nhận Diện</asp:Label><br />
    <br />
    <div id="divNhanDien" class="" style="overflow: scroll">
        <asp:GridView ID="gridNhanDien" runat="server" AutoGenerateColumns="False" CellPadding="4"
            ForeColor="#333333" GridLines="Both" OnRowCancelingEdit="gridNhanDien_RowCancelling"
            OnRowCommand="gridNhanDien_RowCommand" OnRowDeleting="gridNhanDien_RowDeleting"
            OnRowEditing="gridNhanDien_RowEditing" OnRowUpdating="gridNhanDien_RowUpdating"
            DataKeyNames="id" Width="850px">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField Visible="false">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lbIDNhanDien" Text='<%#Eval("id") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Nội dung">
                    <EditItemTemplate>
                        <asp:TextBox ID="tbNoiDungNhanDien" Width="150px" runat="server" Text='<%#Eval("noidung") %>'></asp:TextBox>
                        <asp:RequiredFieldValidator runat="server" ID="rfvNoiDungNhanDien" ControlToValidate="tbNoiDungNhanDien"
                            ValidationGroup="var1" ErrorMessage="*"></asp:RequiredFieldValidator>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbNoiDungNhanDien" runat="server" Text='<%#Eval("noidung") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Thông tin">
                    <EditItemTemplate>
                        <asp:TextBox ID="tbThongTinNhanDien" runat="server" Width="520px" Text='<%#Eval("thongtin") %>'></asp:TextBox>
                        <asp:RequiredFieldValidator runat="server" ID="rfvThongTinNhanDien" ControlToValidate="tbThongTinNhanDien"
                            ValidationGroup="var1" ErrorMessage="*"></asp:RequiredFieldValidator>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbThongTinNhanDien" runat="server" Text='<%#Eval("thongtin") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Action" Visible="false">
                    <ItemTemplate>
                        <asp:LinkButton ID="btnEditNhanDien" Text="Edit" runat="server" CommandName="Edit"></asp:LinkButton><br />
                        <asp:LinkButton ID="btnDeleteNhanDien" Text="Delete" runat="server" CommandName="Delete"></asp:LinkButton>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:LinkButton ID="btnUpdateNhanDien" Style="color: White" Text="Update" runat="server"
                            CommandName="Update"></asp:LinkButton>
                        <asp:LinkButton ID="btnCancelNhanDien" Style="color: White" Text="Cancel" runat="server"
                            CommandName="Cancel"></asp:LinkButton>
                    </EditItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <div id="divSubmitResetNhanDien" runat="server" style="display: none">
            <table>
                <tr>
                    <td>
                        <asp:Label ID="lblNoiDung1" runat="server" Text="Nội dung"></asp:Label><br />
                        <asp:TextBox ID="tbNoiDung1" runat="server" Width="150px" TextMode="MultiLine" onkeyup="AutoExpand(this)"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Label ID="lblThongTin1" runat="server" Text="Thông tin"></asp:Label><br />
                        <asp:TextBox ID="tbThongTin1" runat="server" Width="520px" TextMode="MultiLine" onkeyup="AutoExpand(this)"></asp:TextBox>
                    </td>
                </tr>
            </table>
            <asp:Button ID="btnSubmitNhanDien" runat="server" class="button" Text="Submit" OnClick="btnSubmitNhanDien_Click" />
            <asp:Button ID="btnResetNhanDien" runat="server" class="button" Text="Reset" OnClick="btnResetNhanDien_Click" />
        </div>
    </div>
    <asp:Label ID="lblXuLy" runat="server" class="redTitle">II. Xử lý</asp:Label><br />
    <br />
    <div id="divXuLy" class="" style="overflow: scroll">
        <asp:GridView ID="gridXuLy" runat="server" AutoGenerateColumns="False" CellPadding="4"
            ForeColor="#333333" GridLines="Both" OnRowCancelingEdit="gridXuLy_RowCancelling"
            OnRowCommand="gridXuLy_RowCommand" OnRowDeleting="gridXuLy_RowDeleting" OnRowEditing="gridXuLy_RowEditing"
            OnRowUpdating="gridXuLy_RowUpdating" DataKeyNames="id" Width="850px">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField Visible="false">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lbIDXuLy" Text='<%#Eval("id") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Nội dung">
                    <EditItemTemplate>
                        <asp:TextBox ID="tbNoiDungXuLy" Width="150px" runat="server" Text='<%#Eval("noidung") %>'></asp:TextBox>
                        <asp:RequiredFieldValidator runat="server" ID="rfvNoiDungXuLy" ControlToValidate="tbNoiDungXuLy"
                            ValidationGroup="var1" ErrorMessage="*"></asp:RequiredFieldValidator>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbNoiDungXuLy" runat="server" Text='<%#Eval("noidung") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Thông tin">
                    <EditItemTemplate>
                        <asp:TextBox ID="tbThongTinXuLy" runat="server" Width="520px" Text='<%#Eval("thongtin") %>'></asp:TextBox>
                        <asp:RequiredFieldValidator runat="server" ID="rfvThongTinXuLy" ControlToValidate="tbThongTinXuLy"
                            ValidationGroup="var1" ErrorMessage="*"></asp:RequiredFieldValidator>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbThongTinXuLy" runat="server" Text='<%#Eval("thongtin") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Action" Visible="false">
                    <ItemTemplate>
                        <asp:LinkButton ID="btnEditXuLy" Text="Edit" runat="server" CommandName="Edit"></asp:LinkButton><br />
                        <asp:LinkButton ID="btnDeleteXuLy" Text="Delete" runat="server" CommandName="Delete"></asp:LinkButton>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:LinkButton ID="btnUpdateXuLy" Style="color: White" Text="Update" runat="server"
                            CommandName="Update"></asp:LinkButton>
                        <asp:LinkButton ID="btnCancelXuLy" Style="color: White" Text="Cancel" runat="server"
                            CommandName="Cancel"></asp:LinkButton>
                    </EditItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <div id="divSubmitResetXuLy" runat="server" style="display: none">
            <table>
                <tr>
                    <td>
                        <asp:Label ID="lblNoiDung2" runat="server" Text="Nội dung"></asp:Label><br />
                        <asp:TextBox ID="tbNoiDung2" runat="server" Width="150px" TextMode="MultiLine" onkeyup="AutoExpand(this)"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Label ID="lblThongTin2" runat="server" Text="Thông tin"></asp:Label><br />
                        <asp:TextBox ID="tbThongTin2" runat="server" Width="520px" TextMode="MultiLine" onkeyup="AutoExpand(this)"></asp:TextBox>
                    </td>
                </tr>
            </table>
            <asp:Button ID="btnSubmitXuLy" runat="server" class="button" Text="Submit" OnClick="btnSubmitXuLy_Click" />
            <asp:Button ID="btnResetXuLy" runat="server" class="button" Text="Reset" OnClick="btnResetXuLy_Click" />
        </div>
    </div>
</div>
<div id="divPopupEdit" style="display: none" runat="server">
    <div class="stylePopup" runat="server" id="StylePopup">
        <asp:Panel ID="Panel10" runat="server" Width="1000px">
            <div style="background-color: #4B6C9E; font-size: x-large; text-align: center;" align="center">
                <asp:Label ID="Label5" Style="color: Red" runat="server">Edit</asp:Label>
            </div>
            <CKEditor:CKEditorControl ID="CKEditor1" runat="server"></CKEditor:CKEditorControl>
            <asp:Button Text="OK" runat="server" class="button" ID="btnOK" OnClick="btnOK_Click" />
            <asp:Button Text="Cancel" runat="server" class="button" ID="btnCancel" OnClick="btnCancel_Click" />
        </asp:Panel>
    </div>
    <div class="modalBackground" id="ModalBackground">
    </div>
</div>
<div id="divHidden" style="display: none">
    <asp:HiddenField ID="hdnPart" runat="server" Value="" />
    <asp:HiddenField ID="hdnIDMau" runat="server" Value="" />
    <asp:HiddenField ID="hdnCheckConfirm" runat="server" Value="" />
</div>
